#ifndef __FEEDBACK_HELPER_H
#define __FEEDBACK_HELPER_H


#include "xml\SyExpat.h"
#include "xml\SyGen.h"

enum DATAINDEX
{
    data_dumb,
    data_func,
    data_desc,
	data_userid,
	data_pwd,
	data_dbfieldInt,
	data_dbfieldStr,
	data_dbfieldBin,
	data_size
};

class c4_Storage;
class CFeedbackHandler : public CBase, public MSyDocHandler
{
public:
	CFeedbackHandler();
	virtual ~CFeedbackHandler();
	
	virtual void StartElement(const TQualified& aName, const RArray<TAttribute>& attributes);
	virtual void EndElement(const TQualified& aName);
	virtual void CharacterData(const TDesC& aData);
	virtual void ProcessingInstruction(const TDesC& aTarget, const TDesC& aData);
	virtual void Comment(const TDesC& aData);
	virtual void StartCDataSection();
	virtual void EndCDataSection();
	virtual void Default(const TDesC& /*aData*/);
	
	virtual void SetParser(CExpatParserBase* aParser);
private:
	void Indent(const TInt aDepth);
	
protected:
//	RTest&			iTest;
	TInt			iDepth;
	
public:
	HBufC* iDataBuffer[data_size];
		
private:
	int m_dataid;
	TBuf<256> iStrBuffer;
	bool m_databaseMode;
	TBuf<128> m_fieldtype;	
	TBuf8<128> m_fieldname;
	TBuf8<128> m_tablename;	
	int m_rowid; //current work row
	c4_Storage* iDBStore;
};

#endif // __FEEDBACK_HELPER_H
